{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "c73d803c-a005-496f-9812-7eb414ce6449",
   "metadata": {},
   "source": [
    "# Contour Plot\n",
    "\n",
    "A contour plot of the air temperature over the US. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ac5ea091-6484-4fc8-9852-d48acd90cc74",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.xarray # noqa\n",
    "\n",
    "ds = hvplot.sampledata.air_temperature('xarray').sel(time='2014-02-25 12:00')\n",
    "\n",
    "ds.hvplot.contour(\n",
    "    x='lon',\n",
    "    y='lat',\n",
    "    z='air',\n",
    "    levels=list(range(240, 300, 5)),\n",
    "    cmap='plasma_r',\n",
    "    line_width=1.2,\n",
    "    data_aspect=1,\n",
    "    clabel='Air Temperature (K)',\n",
    "    title='Contour Plot (Bokeh)',\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "35600940-c23c-4629-b8e1-bc45df3e108e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.xarray # noqa\n",
    "hvplot.extension('matplotlib')\n",
    "\n",
    "ds = hvplot.sampledata.air_temperature('xarray').sel(time='2014-02-25 12:00')\n",
    "\n",
    "ds.hvplot.contour(\n",
    "    x='lon',\n",
    "    y='lat',\n",
    "    z='air',\n",
    "    c='air',\n",
    "    levels=list(range(240, 300, 5)),\n",
    "    cmap='plasma_r',\n",
    "    linewidth=1.2,\n",
    "    data_aspect=1,\n",
    "    width=700,\n",
    "    clabel='Air Temperature (K)',\n",
    "    title='Contour Plot (Matplotlib)',\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4f0cd955-3e03-42a5-b581-f828036e1716",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Contour Plots reference documentation](../../ref/api/manual/hvplot.hvPlot.contour.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
